package com.cssl.gulimall.cart.service;

import com.cssl.common.vo.cart.CartItemVO;
import com.cssl.common.vo.cart.CartVO;

import java.util.List;
import java.util.concurrent.ExecutionException;

public interface CartService {
    /**
     * 添加sku商品到购物车
     */
    CartItemVO addToCart(Long skuId, Integer num) throws ExecutionException, InterruptedException;

    /**
     * 根据skuId获取购物车商品信息
     */
    CartItemVO getCartItem(Long skuId);

    CartVO getCart() throws ExecutionException, InterruptedException;

    void deleteIdCartInfo(Integer skuId);

    void changeItemCount(Long skuId, Integer num);

    void checkItem(Long skuId, Integer check);

    List<CartItemVO> getUserCartItems();
}
